package ${project.packageName}.${project.dataCenterType};

import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
<#if project.dataCenterType=="hbase">
import ${project.packageName}.${project.dataCenterType}.constant.HbaseConf;
import ${project.packageName}.${project.dataCenterType}.constant.ValidateConf;
@EnableConfigurationProperties({HbaseConf.class, ValidateConf.class})
</#if>
@SpringBootApplication
public class App 
{
	public static void main(String[] args) {
		SpringApplication.run(App.class, args);
	} 
	@Bean  
    public WebMvcConfigurer corsConfigurer() {  
        return new WebMvcConfigurerAdapter() {  
            @Override  
            public void addCorsMappings(CorsRegistry registry) {  
                registry.addMapping("/**");  
            }  
        };  
    }  
}
